<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0" /> -->
    <style>
      * {
        margin: 0;
        padding: 0;
      }
    </style>
    <title>Document</title>
  </head>
  <body>
    <div style="width: 980px; height: 100px; background-color: red"></div>
    <div style="width: 375px; height: 100px; background-color: skyblue"></div>
    <script>
      window.onload = () => {
        console.log(document.documentElement.clientWidth, 'clientWidth')
        console.log(window.screen, 'screen')
        console.log(window.innerWidth, 'innerwidth')
      }
      window.onresize = () => {
        console.log(document.documentElement.clientWidth, 'clientWidth')
        console.log(window.screen, 'screen')
        console.log(window.innerWidth, 'innerwidth')
      }
    </script>
  </body>
</html>
